class DateTime {
  // 时间格式初始化
  initDate (time) {
    let date = new Date(time)
    return `${date.getFullYear()}-${date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)}-${date.getDate() < 10 ? '0' + (date.getDate()) : (date.getDate())}`
  }
}

export default DateTime
